<link rel="stylesheet" href="http://www.12301.cc/css/common/www.12301.cc.global.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/pft_show/css/common.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/pft_show/css/changguan.css"/>
<link rel="stylesheet" href="http://www.12301.cc/tpl/pft_show/css/imgUploador.css"/>
<!--[if lt IE 7]><div id="guanContainer" class="lt-ie10 lt-ie9 lt-ie8 lt-ie7 ie6 guanContainer commonRigContainer"> <![endif]-->
<!--[if IE 7]><div id="guanContainer" class="lt-ie10 lt-ie9 lt-ie8 ie7 guanContainer commonRigContainer"> <![endif]-->
<!--[if IE 8]><div id="guanContainer" class="lt-ie10 lt-ie9 ie8 guanContainer commonRigContainer"> <![endif]-->
<!--[if IE 9]><div id="guanContainer" class="lt-ie10 ie9 guanContainer commonRigContainer"><![endif]-->
<!--[if gt IE 9]><!--><div id="guanContainer" class="guanContainer commonRigContainer"> <!--<![endif]-->
    <div id="venuenameHead"  data-venueid="<?=$_GET['venue_id']?>" class="venuenameHead">
        <div class="t">
            <p class="create pt"><span class="iconfont">&#xe647;</span><span class="venuename">新建场馆</span></p>
            <p style="display:none" class="edit pt"><span class="iconfont">&#xe67b;</span><span class="venuename">编辑场馆</span></p>
        </div>
    </div>
    <div id="formContainer" class="formContainer">
        <div class="formGroup name">
            <div class="lt">场馆名称：</div>
            <div class="rt">
                <input name="venue_name" id="venue_name_inp" value="<?=$var["venue_name"]?>" class="formInp" type="text"/>
            </div>
            <span id="errorTip_venues" class="errorTip venues"><i class="star">*</i>场馆名称不能为空</span>
        </div>
        <div class="formGroup upload">
            <div class="lt">场馆分布图：</div>
            <div class="rt">
                <div class="uploadGroup">
                    <div id="mapUpload-container" style="background-image:url(<?=$var["venue_thumb"]?>)" class="ui-upload-container">
                        <iframe frameborder="0" name="loader_iframe"></iframe>
                        <form id="" action="call/upload_api.php" enctype="multipart/form-data" method="post" target="loader_iframe">
                            <label for="imgupload_file">
                                    <i class="iconfont">&#xe675;</i><span class="t">上传图片</span>
                                    <input type="file" name="img_upload_file_input" class="fileInp" id="imgupload_file"/>
                            </label>
                            <input name="callback" value="uploador.oncomplete" type="hidden"/>
                        </form>
                       <div class="loading">
                            <div class="loadingCon">
                                <img src="http://www.12301.cc/images/icons/gloading.gif" alt=""/><span class="t">正在上传...</span>
                            </div>
                       </div>
                    </div>
                </div>
            </div>
            <span id="errorTip_thum" class="errorTip thum"><i class="star">*</i>请上传场馆分布图</span>
        </div>
        <div class="formGroup upload">
            <div class="lt">分区：</div>
            <div class="rt">
                <form id="submitForm" class="submitForm" action="">
                    <input name="action" type="hidden" value="venues"/>
                    <input name="venue_name" type="hidden" id="venue_name_hidInp" value="<?=$var["venue_name"]?>"/>
                    <input id="venuse_thumb_inp" name="venue_thumb" type="hidden" value="<?=$var["venue_thumb"]?>"/>
                    <input name="venue_id" type="hidden" value="<?=$var["venue_id"]?>"/>
                    <ul id="fenUl" class="fenUl">
                        <?php
                            $zone_list = $var["zone_list"];
                            if(count($zone_list)==0){
                                echo '<li data-key="0" class="fenLi">';
                                echo '<input class="formInp" name="area_name[0]" value="VIP区" type="text"/>';
                                echo '<input class="isDelectHidInp" name="isDelete[0]" value="1" type="hidden"/>';
                                echo '<input class="areaidHidInp" name="area_id[0]" value="0" type="hidden"/>';
                                echo '<span class="addBtn amBtn">添加</span>';
                                echo '<span class="errorTip fenqu"><i class="star">*</i>分区名称不能为空</span>';
                                echo '</li>';

                                echo '<li data-key="1" class="fenLi">';
                                echo '<input class="formInp" name="area_name[1]" value="嘉宾区" type="text"/>';
                                echo '<input class="isDelectHidInp" name="isDelete[1]" value="1" type="hidden"/>';
                                echo '<input class="areaidHidInp" name="area_id[1]" value="0" type="hidden"/>';
                                echo '<span class="minuBtn amBtn">删除</span>';
                                echo '<span class="errorTip fenqu"><i class="star">*</i>分区名称不能为空</span>';
                                echo '</li>';

                                echo '<li data-key="2" class="fenLi">';
                                echo '<input class="formInp" name="area_name[2]" value="普通区" type="text"/>';
                                echo '<input class="isDelectHidInp" name="isDelete[2]" value="1" type="hidden"/>';
                                echo '<input class="areaidHidInp" name="area_id[2]" value="0" type="hidden"/>';
                                echo '<span class="minuBtn amBtn">删除</span>';
                                echo '<span class="errorTip fenqu"><i class="star">*</i>分区名称不能为空</span>';
                                echo '</li>';
                            }else{
                                foreach($zone_list as $key => $zone){
                                    echo '<li data-key="'.$key.'" class="fenLi">';
                                    echo '<input class="formInp" name="area_name['.$key.']" value="'.$zone["zone_name"].'" type="text"/>';
                                    echo '<input class="isDelectHidInp" name="isDelete['.$key.']" value="1" type="hidden"/>';
                                    echo '<input class="areaidHidInp" name="area_id['.$key.']" value="'.$zone["zone_id"].'" type="hidden"/>';
                                    if($key=='0'){
                                        echo '<span class="addBtn amBtn">添加</span>';
                                    }else{
                                        echo  '<span class="minuBtn amBtn">删除</span>';
                                    }
                                    echo '<span class="errorTip fenqu"><i class="star">*</i>分区名称不能为空</span>';
                                    echo '</li>';
                                }
                            }

                        ?>
                    </ul>
                </form>
            </div>
        </div>
        <a id="submitBtn" class="submitBtn" href="javascript:void(0)">下一步</a>
    </div>
</div>
<!-- tpl 添加分区-->
<script id="fenqu-list-tpl" type="text/template">
    <li data-key="<%=areaid%>" class="fenLi">
        <input class="formInp" name="area_name[<%=areaid%>]" type="text"/><span class="minuBtn amBtn">删除</span>
        <input class="isDelectHidInp" name="isDelete[<%=areaid%>]" value="1" type="hidden"/>
        <input class="areaidHidInp" name="area_id[<%=areaid%>]" value="0" type="hidden"/>
        <span class="errorTip fenqu"><i class="star">*</i>分区名称不能为空</span>
    </li>
</script>
<script type="text/javascript" src="http://www.12301.cc/js/global/www.12301.cc.global.js"></script>
<script type="text/javascript" src="http://wx.12301.cc/public/js/common/class.js"></script>
<script type="text/javascript" src="http://wx.12301.cc/public/js/common/ajax.js"></script>
<script type="text/javascript" src="http://www.12301.cc/js/components/ImgUploador.js"></script>
<script type="text/javascript" src="http://www.12301.cc/tpl/pft_show/js/changguan.js"></script>